{set:$user_id = $this->user['user_id']}
{set:$page= (isset($_GET['page'])&&(intval($_GET['page'])>0))?intval($_GET['page']):1;}
{set:$queryPointLog = Api::run('getUcenterPointLog',$user_id,$this->c_datetime)}
{set:$items = $queryPointLog->find()}
<section>
<div class="pending-detial">
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">我的积分</h3>
	</div>
<div class="panel-body">
		<!--积分消耗列表 开始-->		
		{if:$items}
		{foreach:items = $items}
		<ul >
			<li class="kli">
				<div class="kleft left">积分日期：</div>
				<div class="kright left">{$item['datetime']}</div>
			</li>
			<li class="kli">
				<div class="kleft left">积分：</div>
				<div class="kright left">{$item['value']}分</div>
			</li>
			<li class="kli">
				<div class="kleft left">说明：</div>
				<div class="kright left">{$item['intro']}</div>
			</li>
		</ul>
		{/foreach}
		{$queryPointLog->getPageBar()}
		<!--积分消耗列表 结束-->

		{else:}
		<ul >
			<li class="kli text-center">当前暂无数据</li>
		</ul>
		{/if}
	</div>
	<div class="pending-detial">
		<div class="row clearfix">
		<h2 style="margin-top:0;margin-left:10px">积分兑换</h2>
		<form action='{url:/ucenter/trade_ticket}' method='post'>
			{set:$nowtime = ITime::getDateTime();$isHasTicket = false;}
			{foreach:items=Api::run('getTicketList',array('#nowtime#',$nowtime),20)}
			{set:$isHasTicket = true;}
		
			<div style="margin-bottom:10px" class="col-md-6  column">
				<input type="radio" name='ticket_id' value="{$item['id']}" class="">{$item['name']}：{$item['value']}元（需要{$item['point']}积分）
			</div>
			<div style="margin-bottom:10px" class="col-md-6 column">有效日期：{$item['start_time']}至{$item['end_time']}
				
			</div>
                     		{/foreach}
			<div style="margin-bottom:10px" class="col-md-12  column">
				<input type="submit"  value="兑换代金券" class="btn  btn-block">
			</div>
	
	

		</form>
		</div>
	</div>
</div>

	</div>
</section>